<p-dialog [(visible)]="display" modal="modal"  [responsive]="true" [width]="width" (onHide)="closeInspectionMask(false)">
  <p-header>
    {{title}}
  </p-header>
  <div class="ui-g">
    <div class="ui-g-12">
      <div class="file-box">
        <form class="form-horizontal" [formGroup]="addContent" >
          <div class="form-group">
            <label  class="col-sm-2 control-label">巡检内容名:</label>
            <div class="col-sm-9">
              <input type="text" name="reportType" class="form-control" [(ngModel)]="currentInspection.name" *ngIf="state ==='update'" formControlName="contentName">
              <input type="text" name="reportType" class="form-control" [(ngModel)]="submitAddInspection.name" *ngIf="state ==='add'" formControlName="contentName">
            </div>
          </div>
          <div class="form-group">
            <label  class="col-sm-2  control-label">巡检周期名:</label>
            <div class="col-sm-9 ui-fluid">
              <p-dropdown [options]="inspectionNames" [(ngModel)]="currentInspection.inspection_cycle_cid" [autoWidth]="false" name="cycle" *ngIf="state ==='update'" formControlName="cycleName"></p-dropdown>
              <p-dropdown [options]="inspectionNames" [(ngModel)]="submitAddInspection.inspection_cycle_cid" [autoWidth]="false" name="cycle" *ngIf="state ==='add'" formControlName="cycleName"></p-dropdown>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <p-footer>
    <button type="button" pButton icon="fa-check" label="确定" (click)="formSubmit(false)" [disabled]="!addContent.valid"></button>
    <button type="button" pButton icon="fa-close"  label="取消" (click)="closeInspectionMask(false)"></button>
  </p-footer>
</p-dialog>
